using UnityEngine;
using System.Collections;
using System.Collections.Generic;

namespace ESCENARIOS
{
	public class Juego: MonoBehaviour  {
		//Propiedades
		public static float MouseClickPosX;
		public static float MouseClickPosY;
		public static int direccionPantalla = 1;
		public static INTERFAZ.Herramienta herramientaSeleccionada;

		//Eventos
		 void Start()
		{

		}

		//Metodos

		/// <summary>
		/// Detectars the click.
		/// </summary>
		/// <returns><c>true</c>, if click was detectared, <c>false</c> otherwise.</returns>
		/// <param name="pMousePosX">P mouse position x.</param>
		/// <param name="pMousePosY">P mouse position y.</param>
		/// <param name="pX">P x.</param>
		/// <param name="pY">P y.</param>
		/// <param name="pAncho">P ancho.</param>
		/// <param name="pAlto">P alto.</param>
		public bool DetectarClick(float pX, float pY, float pAncho, float pAlto)
		{
			Rect rectanguloArea = new Rect(pX, pY, pAncho, pAlto);
			if(rectanguloArea.Contains(new Vector3(MouseClickPosX, MouseClickPosY)))
			   return true;
			 else
			   return false;

		}

		//Eventos

	}
}

